<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:util="http://java.sun.com/jsf/composite/util">
	
	<p:dialog appendToBody="true" modal="true" closable="true" header="#{i18n.DialogoClientePortal_Header}"
		widgetVar="dialogoBuscaClientePortal" width="540" resizable="false">
		<h:form id="formBuscaClientePortal">
		<div class="dialogo_container_18">
			<util:dialogoLabel value="#{i18n.DialogoClientePortal_Nome}" />
			<div class="dialogo_grid_14">
				<p:inputText value="#{clientePortalBean.varBuscaClientePortal}" styleClass="dialogo_width_14"/>
			</div>
			<div class="dialogo_grid_4">
				<ui:include src="/views/layouts/_ajaxStatus.xhtml" />
				<p:commandButton value="#{i18n.btn_FiltrarPrompt}" style="margin-top:-1px;float:right" icon="ui-icon ui-icon-search"
					action="#{clientePortalBean.filtrarClientePortal}" update="formBuscaClientePortal:dataTableBuscaClientePortal"
					id="btnFiltrar"/>
			</div>
			<div class="dialogo_grid_18">
				<br/>
				<p:dataTable widgetVar="dataTableBuscaClientePortal" 
							id="dataTableBuscaClientePortal"
							paginator="true" dynamic="true" lazy="true"
							selection="#{clientePortalBean.clientePortalInstance}" 
							value="#{clientePortalBean.clientePortalList}" 
							selectionMode="single" var="var"
							paginatorTemplate="#{contextoBean.paginatorTemplate}"
							paginatorPosition="#{contextoBean.paginatorPosition}"
							rows="#{contextoBean.dataTableRows}" 
							rowsPerPageTemplate="#{contextoBean.rowsPerPage}"
							emptyMessage="#{i18n.NenhumClientePortalEncontrado}">
					<p:column headerText="#{i18n.DialogoClientePortal_Nome}">  
			            <h:outputText value="#{var.nomeCompleto}" />  
			        </p:column> 
				</p:dataTable>
			</div>
			<util:hr />
			<div class="dialogo_grid_18 right">
				<p:commandButton action="#{clientePortalBean.selecionarClientePortal}"  
					update="@form, :formPrincipal" onstart="spinner.show();" value="#{i18n.btn_Selecionar}"
					oncomplete="spinner.hide();dialogoBuscaClientePortal.hide()"/>
				<p:commandButton action="#{clientePortalBean.cancelarSelecionarClientePortal}" 
					update="@form" onclick="dialogoBuscaClientePortal.hide()" value="#{i18n.btn_Cancelar}" />	
			</div>
		</div>
		</h:form>
		<util:dataTableBlockUI trigger=":formBuscaClientePortal:dataTableBuscaClientePortal"
			block=":formBuscaClientePortal:dataTableBuscaClientePortal" />
		<util:dataTableBlockUI trigger=":formBuscaClientePortal:btnFiltrar"
			block=":formBuscaClientePortal:dataTableBuscaClientePortal" />
	</p:dialog>
</f:view>